package com.cxw.healthserver.utils

import java.text.SimpleDateFormat


/**
 * @createTime 2024/2/18 18:06
 * @author 崔兴旺
 * @description
 */
class TimeUtils {
    companion object {
        fun parse2Long(dateTimeStr:String?):Long{
            if(dateTimeStr.isNullOrEmpty()){
                return 0
            }
            val sdf =  SimpleDateFormat("MMM dd, yyyy, h:mm:ss a");
            val date = sdf.parse(dateTimeStr)
            val timeInMillis = date.time
            return timeInMillis
        }
    }
}